<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>我的消息</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="fly,layui,前端社区">
  <meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
  <link rel="stylesheet" href="${ pageContext.request.contextPath }/res/layui/css/layui.css">
  <link rel="stylesheet" href="${ pageContext.request.contextPath }/res/css/global.css">
  <script type="text/javascript" src="${ pageContext.request.contextPath }/res/js/template-web.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/res/js/jquery-2.1.4.min.js"></script>
  <script type="text/javascript">
     $(function(){
    	 $.ajax({
    		   url : '${ pageContext.request.contextPath }/article/getminemsg',
    		   type : 'get',
    		   async : true,
    		   dataType:'json',
    		   success : function(data){
    			   console.log(data);
    			   var json = {
    				   'minelist' : data
    			   }
    			   console.log(json);
    			   var textm = template('mine_list',json);
    			   $('#mine_ul').html(textm);   
    		   },
    		   error : function(){
    			   alert('获取失败');
    		   }
    	   })
     })
  </script>
  
  
</head>
<body>

<div class="header">
  <div class="main">
    <a class="logo" href="/" title="Fly">Fly社区</a>
    <div class="nav">
      <a class="nav-this" href="index.html">
        <i class="iconfont icon-wenda"></i>问答
      </a>
      <a href="http://www.layui.com/" target="_blank">
        <i class="iconfont icon-ui"></i>框架
      </a>
    </div>
    
    <div class="nav-user">      
      <!-- 登入后的状态 -->
      
      <a class="avatar" href="${ pageContext.request.contextPath }/go/index"> 
		<img class="headurl" src="${ pageContext.request.contextPath }/res/images/avatar/${login_user.headurl}">
			<cite>${login_user.nickname}</cite> <i>VIP2</i>
			</a>
		<div class="nav">
			<a href="${ pageContext.request.contextPath }/user/collectlist"><i
			   class="iconfont icon-shezhi"></i>设置</a> <a
			   href="${ pageContext.request.contextPath }/user/logout"><i
			   class="iconfont icon-tuichu" style="top: 0; font-size: 22px;"></i>退了</a>
		</div>
      
    </div>
  </div>
</div>

<div class="main fly-user-main layui-clear">
  <ul class="layui-nav layui-nav-tree layui-inline">
			<li class="layui-nav-item"><a href="${ pageContext.request.contextPath }/user/home"> <i
			class="layui-icon">&#xe609;</i> 我的主页
			</a></li>
			<li class="layui-nav-item"><a href="${ pageContext.request.contextPath }/user/collectlist"> <i
					class="layui-icon">&#xe612;</i> 用户中心
			</a></li>
			<li class="layui-nav-item layui-this"><a href="${ pageContext.request.contextPath }/go/set"> <i
					class="layui-icon">&#xe620;</i> 基本设置
			</a></li>
			<li class="layui-nav-item"><a href="${ pageContext.request.contextPath }/user/message"> <i
					class="layui-icon">&#xe611;</i> 我的消息
			</a></li>
		</ul>
  
  <div class="site-tree-mobile layui-hide">
    <i class="layui-icon">&#xe602;</i>
  </div>
  <div class="site-mobile-shade"></div>

 <div class="fly-panel fly-panel-user" pad20>
	  <div class="layui-tab layui-tab-brief" lay-filter="user" id="LAY_msg" style="margin-top: 15px;">
	    <button class="layui-btn layui-btn-danger" id="LAY_delallmsg">清空全部消息</button>
	    <div  id="LAY_minemsg" style="margin-top: 10px;">
        <!--<div class="fly-none">您暂时没有最新消息</div>-->
        <script type="text/html" id="mine_list">
        {{ each minelist as value i }}
          <li data-id="123">
            <blockquote class="layui-elem-quote">
              <a href="/jump?username=Absolutely" target="_blank"><cite>{{ value.nickname }}</cite></a>回答了您的{{ value.typename }}<a target="_blank" href="/jie/8153.html/page/0/#item-1489505778669"><cite>{{ value.title }}</cite></a>
            </blockquote>
            <p><span>{{ value.minetime }}小时前</span>
            <a href="javascript:;" class="layui-btn layui-btn-small layui-btn-danger fly-delete">删除</a></p>
          </li>
        {{ /each }}
        </script>
        <ul id="mine_ul" class="mine-msg">

        	<%-- <c:if test="${mslist!=null }">
        	<c:forEach items="${mslist}" var="list">
          <li data-id="123">
            <blockquote class="layui-elem-quote">
              <a href="/jump?username=Absolutely" target="_blank"><cite>${list.commid }</cite></a>回答了您的求解<a target="_blank" href="/jie/8153.html/page/0/#item-1489505778669"><cite>${list.title}</cite></a>
            </blockquote>
            <p><span>${list.commtime}</span><a href="javascript:;" class="layui-btn layui-btn-small layui-btn-danger fly-delete">删除</a></p>
          </li>
          </c:forEach>
          </c:if>
          <li data-id="123">
            <blockquote class="layui-elem-quote">
              系统消息：欢迎使用 layui
            </blockquote>
            <p><span>1小时前</span><a href="javascript:;" class="layui-btn layui-btn-small layui-btn-danger fly-delete">删除</a></p>
          </li> --%>
        </ul>
      </div>
	  </div>
	</div>

</div>


<div class="footer">
  <p><a href="http://fly.layui.com/">Fly社区</a> 2017 &copy; <a href="http://www.layui.com/">layui.com</a></p>
  <p>
    <a href="http://fly.layui.com/auth/get" target="_blank">产品授权</a>
    <a href="http://fly.layui.com/jie/8157.html" target="_blank">获取Fly社区模版</a>
    <a href="http://fly.layui.com/jie/2461.html" target="_blank">微信公众号</a>
  </p>
</div>
<script src="${ pageContext.request.contextPath }/res/layui/layui.js"></script>
<script>
layui.cache.page = 'user';
layui.cache.user = {
  username: '游客'
  ,uid: -1
  ,avatar: '${ pageContext.request.contextPath }/res/images/avatar/00.jpg'
  ,experience: 83
  ,sex: '男'
};
layui.config({
  version: "2.0.0"
  ,base: '${ pageContext.request.contextPath }/res/mods/'
}).extend({
  fly: 'index'
}).use('fly');
</script>

</body>
</html>